-- GENERATED SPELL FOR [Stormforged Magus] --


function spell0_29374(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(32193,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29374', 15000, 1)
end

function spell1_29374(pUnit, Event) --@Lightning Shield,n/a--
pUnit:FullCastSpellOnTarget(12550,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29374', 0, 1)
end

function Sorts_29374(pUnit, Event)
local choix_sorts_29374 = math.random(0, 1)
if choix_sorts_29374 == 0 then
pUnit:RegisterEvent('spell0_29374', 1, 1)
end
if choix_sorts_29374 == 1 then
pUnit:RegisterEvent('spell1_29374', 1, 1)
end
end

function mob29374_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29374', math.random(1500, 3000), 1)
end

function mob29374_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29374_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29374_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29374, 1, 'mob29374_Action')
RegisterUnitEvent(29374, 2, 'mob29374_Leave')
RegisterUnitEvent(29374, 3, 'mob29374_Kill')
RegisterUnitEvent(29374, 4, 'mob29374_Die')
